import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';

export class LoginDto {
  @IsString()
  @ApiProperty({ type: String, description: '用户名', default: 'admin' })
  readonly user_name: string;

  @IsString()
  @ApiProperty({ type: String, description: '密码', default: '123456' })
  readonly password: string;

  @IsString()
  @ApiProperty({ type: String, description: '验证码', default: '1234' })
  readonly captcha: string;
}

export class UploadDto {
  // @ApiProperty({ description: '文件名' })
  // @IsString()
  // name: string;

  @ApiProperty({ type: 'string', format: 'binary' })
  file: string;
}
